package com.mt.repair.entity.repairManagement;

import javax.persistence.*;
import java.io.Serializable;
import com.mt.common.core.annotation.DColumn;
import com.mt.common.core.annotation.DEntity;
import com.mt.common.core.web.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;



import com.mt.repair.entity.repairManagement.RepairOrder;

@DEntity(label="维修单状态记录",comment="",moduleLabel="报修管理")
@Entity(name="repair_repair_order_status_record")
@Table(name = "repair_repair_order_status_record" , indexes = { @Index(name = "index_repair_order_id", columnList = "repair_order_id")  })
@ApiModel(description = "维修单状态记录:")
public class RepairOrderStatusRecord extends BaseEntity implements Serializable{
	private static final long serialVersionUID = 1L;

	@DColumn(index=3,label="维修单",foreignEntity="RepairOrder",comment="维修单",component="对象选择",where=false)
	@ApiModelProperty(value = "维修单:维修单")
	@Column(name="repair_order_id",length=255,nullable=false,unique=false)
	private Long repairOrderId;

	@Transient
	private RepairOrder repairOrder;

	@Transient
	@ApiModelProperty(value = "维修单名称:维修单")
	@DColumn(index=3,label="维修单",foreignEntity="RepairOrder",comment="维修单")
	private String repairOrderName;

	@Transient
	@ApiModelProperty(value = "维修单编号:维修单")
	@DColumn(index=3,label="维修单",foreignEntity="RepairOrder",comment="维修单")
	private String repairOrderCode;

	@DColumn(index=4,label="操作",comment="操作",component="文本",where=false)
	@ApiModelProperty(value = "操作:操作")
	@Column(name="operate",length=255,nullable=false,unique=false)
	private String operate;


	public Long getRepairOrderId() {
		return this.repairOrderId;
	}

	public void setRepairOrderId(Long repairOrderId) {
		this.repairOrderId = repairOrderId;
	}

	public String getOperate() {
		return this.operate;
	}

	public void setOperate(String operate) {
		this.operate = operate;
	}

	public RepairOrder getRepairOrder() {
		return this.repairOrder;
	}

	public void setRepairOrder(RepairOrder repairOrder) {
		if(repairOrder == null){
		}
		else
		{
		this.repairOrderId = repairOrder.getEid();
		this.repairOrder = repairOrder;		
		}
}

	public String getRepairOrderName() {
		return this.repairOrderName;
	}

	public void setRepairOrderName(String repairOrderName) {
		this.repairOrderName = repairOrderName;
	}

	public String getRepairOrderCode() {
		return repairOrderCode;
	}

	public void setRepairOrderCode(String repairOrderCode) {
		this.repairOrderCode = repairOrderCode;
	}
}
